const matrixToolKit ={
  makeRow(v = 0) {
    const array = new Array(9);
    array.fill(v);
    return array;
  },
  
  makeMatrix(v = 0) {
    // const array = new Array(9);
    // array.fill(makeRow(v));
    // return array;
  
    // return Array.from({
    //     length: 9
    //   })
    //   .map(() => makeRow(v))
  
    return Array.from({
      length: 9
    }, () => this.makeRow(v))
  
  },

  shuffle(array) {
    const endIndex = array.length - 2;
    for (let i = 0; i <= endIndex; i++) {
      const j = i + Math.floor(Math.random() * (array.length - i));
      [array[i], array[j]] = [array[j], array[i]];
  
    }
    return array;
  }
  
};

// 坐标系

const boxToolkit={

};



module.exports =  class Toolkit{
  static get matrix(){
    return matrixToolKit;
  }
  static get box(){
    return boxToolkit;
  }
}